home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / Technical Docs / Publication Guides / Apple Style Guide 1991 / APPLEEN+FONT downloaderr / appleencode next >
Encoding:
Text File  |  1991-10-15  |  1.2 KB  |  56 lines  |  [TEXT/MSWD]

  1. %! PS-Adobe-2.0
  2. serverdict begin 0 exitserver
  3. %%Title; Font reencoding
  4. %%EndComments
  5. %this file defines a Postscript procedure called "R" 
  6. %which will reencode a font.  It expects to find three 
  7. %things on the operand stack:
  8.  
  9. %    [array] /NewName  /OldName
  10.  
  11. %The array should contain pairs of <number><name>,
  12. %like "32 space", each of which will define a slot in
  13. %the encoding and the name to put in that slot.  Only 
  14. %those names which are needed to override the 
  15. %existing ones need be specified followed by more 
  16. %than one name, like "128/name1 /name2". In this 
  17. %case, the names will be sequentially stored in the 
  18. %encoding starting at the initial number (in this case 
  19. %128).
  20.  
  21.  
  22. /R{
  23.         findfont begin currentdict dup length dict begin
  24.     {    1 index /FID ne {def} {pop pop} ifelse
  25.     }    forall
  26.  
  27.         /FontName exch def dup length 0 ne
  28.  
  29. {        /Encoding Encoding 256 array copy def
  30.         0 exch
  31.  
  32.     {    dup type /nametype eq
  33.  
  34.     {    Encoding 2 index 2 index put
  35.         pop 1 add
  36.     }
  37.     {    exch pop
  38.     }    ifelse
  39.     }    forall
  40.     }    if pop
  41.  
  42.         currentdict dup end end 
  43.         /FontName get exch definefont pop
  44. }        bind def
  45.  
  46. %%EndProlog
  47.  
  48. %%BeginSetup
  49. %%BeginEncoding: Symbol Symbol
  50.  
  51. [8#360/apple] /Symbol /Symbol R
  52.  
  53. %%EndEncoding
  54. %%EndSetup
  55.  
  56.